package com.yixin.hospital.entity.dto.req.usercard;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

@Data
@ApiModel("用户办卡")
public class PatientCardAddReqDTO {


    @ApiModelProperty(value = "患者id", example = "1")
    @NotNull(message = "患者id不能为空")
    private Long patientId;

    @ApiModelProperty(value = "办卡列表", example = "办卡列表")
    @NotNull(message = "卡列表不能为空")
    private List<PatientCardReqDto> userCardList;

    @ApiModelProperty(value = "办卡需支付金额", example = "办卡需支付金额")
    @NotNull(message = "办卡金额不能为空")
    private BigDecimal paidCardTotalAmount;

    @Data
    @ToString
    public static class PatientCardReqDto implements Serializable {
        private Long userId;
        private Long cardId;
        private Integer cardType;
        private String cardName;
        private Object cardRule;
        private Integer status;
        private Integer realQuantity;
        private LocalDateTime startDate;
    }
}
